//
//  SQVoiceView.h
//  energy
//
//  Created by 周曼迪 on 2021/7/23.
//

#import "BaseView.h"
#import "BBVoiceRecordController.h"
#import "NewPlayerManager.h"

NS_ASSUME_NONNULL_BEGIN

@interface SQVoiceView : BaseView
typedef void (^SQVoiceViewBlock)(NSString * path);
// 语音文件的base64编码
@property(nonatomic,copy)NSString *hdr_audio;
// 删除录音按钮
@property(nonatomic,weak)UIButton *close_btn;
// 播放录音按钮
@property(nonatomic,weak)UIButton *play_record_btn;
// 开始录音按钮
@property(nonatomic,weak)UIButton *start_voice_btn;

// UI 部分
@property (nonatomic, strong) BBVoiceRecordController *voiceRecordCtrl;
@property (nonatomic, assign) BBVoiceRecordState currentRecordState;
@property (nonatomic, strong) NSTimer *fakeTimer;
@property (nonatomic, assign) float duration;
@property (nonatomic, assign) BOOL canceled;
@property (nonatomic, assign) BOOL is_touched;
/**回调数据*/
@property (strong, nonatomic) SQVoiceViewBlock  voiceViewBlock;

-(void)showWithChooseBlock:(SQVoiceViewBlock )voiceViewBlock;

-(void)deleteVoiceData;

@property (copy, nonatomic) NSString *voiceUrl;

-(void)buildPlayVoiceVie:(NSString * )urlStr;

@end

NS_ASSUME_NONNULL_END
